﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace MS.InformationManagement.ContentHub.CustomFields
{
    public class AttachedDocumentsFieldValue : SPFieldMultiColumnValue
    {
        public AttachedDocumentsFieldValue(string value)
            : base(value) { }

        public IEnumerable<string> AttachedDocuments
        {
            get
            {
                for (int i = 0; i < this.Count; i++)
                {
                    yield return this[i];
                }
            }
            set
            {
                int index = 0;
                foreach (string attachedDocument in value)
                {
                    this[index] = attachedDocument;
                    index++;
                }
            }
        }
    }
}
